package com.regentsoft.cloudback.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 响应公共类
 *
 * @author czd
 * @version v1.0
 * @since 2017年10月30日
 */
@ApiModel(description = "响应公共类")
public class BaseResp {
    public BaseResp() {
    }

    public BaseResp(boolean result) {
        if (result)
            setCode(ResponseCode.SUCCESS);
        else
            setCode(ResponseCode.FAIL);
    }

    @ApiModelProperty(notes = "状态码")
    private String code;
    @ApiModelProperty(notes = "提示信息")
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(ResponseCode responseCode) {
        this.code = responseCode.getCode();
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
